package com.zl.tby.controller;

import com.zl.tby.core.common.R;
import com.zl.tby.dto.TbyMountainPeakQuery;
import com.zl.tby.model.TbyFileBusiness;
import com.zl.tby.model.TbyMountainPeak;
import com.zl.tby.service.ITbyFileBusinessService;
import com.zl.tby.service.ITbyMountainPeakService;
import com.zl.tby.vo.TbyMountainPeakForm;
import org.noear.solon.annotation.Body;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.core.handle.MethodType;
import org.noear.solon.validation.annotation.NotNull;
import org.noear.solon.validation.annotation.Valid;
import org.noear.solon.validation.annotation.Validated;

import java.util.List;

/**
 * 附件控制器
 * @author changpeng
 * @version 1.0
 * @since 2024/8/6 20:22
 */
@Valid
@Controller
@Mapping("/file_business")
public class TbyFileBusinessController {

    @Inject
    private ITbyFileBusinessService tbyFileBusinessService;

    /**
     * 查询附件
     * @param businessIdentifying: 业务标识
     * @param businessId: 业务id
     * @return 结果
     */
    @Mapping(value = "/list", method = MethodType.GET)
    public R<List<TbyFileBusiness>> attachList(@NotNull String businessIdentifying, @NotNull Long businessId) {
        List<TbyFileBusiness> attachList = this.tbyFileBusinessService.getAttach(businessIdentifying, businessId);
        return R.ok(attachList);
    }

}
